package edu.scau.pos.vo;

import edu.scau.pos.domain.Category;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;
@Tag(name = "分类视图对象",description = "分类视图对象信息")
@Data
public class CategoryVo implements Serializable {
    private static final long serialVersionUID = 1L;
    @Schema(name = "categoryId", description = "分类id",type = "Long",required = false)
    private Long categoryId;
    @Schema(name = "categorySn",description = "分类编码", type = "String")
    @NotBlank(message = "分类编号不能为空")
    private String categorySn;
    @Schema(name = "categoryName",description = "分类名称", type = "String")
    private String categoryName;
    @Schema(name = "parent",description = "父分类(0:无分类, 1:  2:  ), 数据库字段问题所以0是无分类", type = "int")
    private int parent;

    public CategoryVo(Long categoryId, String categorySn, String categoryName, int parent) {
        this.categoryId = categoryId;
        this.categorySn = categorySn;
        this.categoryName = categoryName;
        this.parent = parent;
    }

    public CategoryVo() {
    }
}
